home *** CD-ROM | disk | FTP | other *** search
/ Programming an RTS Game with Direct3D / Programming an RTS Game with Direct3D.iso / Examples / Chapter 7 / Example 7.1 / skinnedMesh.h < prev   
Encoding:
C/C++ Source or Header  |  2006-07-12  |  651 b   |  35 lines

  1. #ifndef SKINNED_MESH
  2. #define SKINNED_MESH
  3.  
  4. #include <windows.h>
  5. #include <d3dx9.h>
  6. #include "debug.h"
  7.  
  8. struct BONE: public D3DXFRAME
  9. {
  10.     D3DXMATRIX CombinedTransformationMatrix;
  11. };
  12.  
  13. struct BONEMESH: public D3DXMESHCONTAINER
  14. {
  15.     //More to come here later...
  16. };
  17.  
  18. class SKINNEDMESH
  19. {
  20.     public:
  21.         SKINNEDMESH();
  22.         ~SKINNEDMESH();
  23.         void Load(char fileName[], IDirect3DDevice9 *Dev);
  24.         void RenderSkeleton(BONE* bone, BONE *parent, D3DXMATRIX world);
  25.  
  26.     private:        
  27.  
  28.         void UpdateMatrices(BONE* bone, D3DXMATRIX *parentMatrix);
  29.  
  30.         IDirect3DDevice9 *m_pDevice;
  31.         D3DXFRAME *m_pRootBone;
  32.         LPD3DXMESH m_pSphereMesh;
  33. };
  34.  
  35. #endif